<template>
  <view class="quiz-record-card">
    <view class="date u-m-b-8">{{ record.date }}</view>
    <view class="desc u-m-b-8">
      <text class="title">{{ record.title }}</text>
    </view>
    <view class="info u-m-b-8">
      用时: {{ record.time }}分钟
      总分: {{ record.total }}
      得分: {{ record.score }}
      正确率: {{ record.correctRate }}%
    </view>
    <view class="actions">
      <view class="continue-btn u-flex u-flex-center u-flex-items-center" @click="$emit('continue')">继续做题</view>
    </view>
  </view>
</template>

<script>
export default {
  props: {
    record: Object
  }
}
</script>

<style lang="scss">
.quiz-record-card {
  background: #F5F4F9;
  border-radius: 20rpx;
  padding: 30rpx;
  margin-bottom: 20rpx;
  .date { color: #aaa; font-size: 24rpx; }
  .desc { margin: 10rpx 0; font-size: 28rpx; }
  .title { font-weight: bold; }
  .info { color: #888; font-size: 24rpx; margin: 10rpx 0; }
  .actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20rpx;
    .continue-btn {
      background: #1976ff;
      color: #fff;
      border-radius: 30rpx;
      padding:6rpx 26rpx;
      font-size: 24rpx;
    }
  }
}
</style> 